<template>
	<view class="m-modal" v-if="show">
		<u-modal v-model="show" width="100%" :showTitle="false" :mask-close-able="true" :show-confirm-button="false">
			<view class="content-box">
				<mBack ref="mBack" :name="backName" @getGameResult="close"></mBack>
				<mGirlsDevelop ref="mGirlsDevelop" :paramsData="paramsData" :useType="useType"></mGirlsDevelop>
			</view>
		</u-modal>
	</view>
</template>

<script>
	import mGirlsDevelop from "@/components/m-girl-develop/index.vue"
	import mBack from "@/components/m-back/index.vue"

	export default {
		props: {
			useType: {
				type: String,
				default: "girl", // girl secretary staff
			}
		},
		components: {
			mGirlsDevelop,
			mBack
		},
		data() {
			return {
				show: false,
				backName: "",
				paramsData: {},
			}
		},
		methods: {
			open(data) {
				this.show = true
				if (data) {
					this.paramsData = {
						...data
					}
					console.log("传递过来的数据是", this.paramsData);
				}
			},
			close() {
				this.$emit('close')
				this.show = false

			}
		}
	}
</script>

<style lang="scss" scoped>
	.m-modal {
		position: relative;
		pointer-events: fill;
		z-index: 999999999999999999999;
	}

	.content-box {
		position: relative;
		width: 100vw;
		height: 100vh;
		background-color: rgba(255, 255, 255, 0);
	}
</style>